﻿
namespace Codemonk.Soya
{
    /// <summary>
    /// 工作薄读取器
    /// </summary>
    public interface IWorkbookReader
    {
        /// <summary>
        /// 文件名称
        /// </summary>
        string FileName { get; set; }
        /// <summary>
        /// 工作薄的个数
        /// </summary>
        int GetSheetCount();
        /// <summary>
        /// 获取工作区名称
        /// </summary>
        /// <param name="sheetIndex">工作区索引</param>
        /// <returns>工作区名称</returns>
        string GetSheetName(int sheetIndex);
        /// <summary>
        /// 获取行数
        /// </summary>
        /// <param name="sheetIndex">工作区索引</param>
        /// <returns>行数</returns>
        int GetRowCount(int sheetIndex);
        /// <summary>
        /// 获取列数
        /// </summary>
        /// <param name="sheetIndex">工作区索引</param>
        /// <returns>列数</returns>
        int GetColumnCount(int sheetIndex);
        /// <summary>
        /// 获取单元格的值
        /// </summary>
        /// <param name="sheetIndex">工作区索引</param>
        /// <param name="rowIndex">行索引</param>
        /// <param name="columnIndex">列索引</param>
        /// <returns>单元格值</returns>
        string GetValue(int sheetIndex, int rowIndex, int columnIndex);
    }
}
